package com.breakfast.fun.data.entity.user.recharge;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/8/24.
 */
public class RechargeMoney {

    /**
     * version : 1.0
     * success : true
     * msg :
     * data : {"alipay":"partner=\"2088811244369510\"&seller_id=\"3134317096@qq.com\"&out_trade_no=\"C768292504201203712\"&subject=\"早范\"&body=\"早范订单结算\"&total_fee=\"0.01\"¬ify_url=\"http://beta.52letsgo.cn/alipay_recharge_notify\"&service=\"mobile.securitypay.pay\"&payment_type=\"1\"&_input_charset=\"utf-8\"&it_b_pay=\"30m\"&return_url=\"m.alipay.com\"&sign=\"CePaep7D6zk64dMZetjtxtrJZFCBB53%2B7Yj60NMt2PG9ItFFEq%2Fw3M%2FyekrRFXSn1YPusRIdCqL%2BX2j%2FHcIjOzY0GysGxV4MQHKFbrVa9FGblEnyAD3qmPX4GnK2bdKuah9R%2BThjIusoGYuqtxjsvSJ9hd%2FXywDHopiKcXha7i4%3D\"&sign_type=\"RSA\"","weiPay":{},"cmbpay":{},"totalPrice":0.01,"freePrice":0,"orderNo":"C768292504201203712"}
     */

    private String version;
    private boolean success;
    private String msg;
    /**
     * alipay : partner="2088811244369510"&seller_id="3134317096@qq.com"&out_trade_no="C768292504201203712"&subject="早范"&body="早范订单结算"&total_fee="0.01"¬ify_url="http://beta.52letsgo.cn/alipay_recharge_notify"&service="mobile.securitypay.pay"&payment_type="1"&_input_charset="utf-8"&it_b_pay="30m"&return_url="m.alipay.com"&sign="CePaep7D6zk64dMZetjtxtrJZFCBB53%2B7Yj60NMt2PG9ItFFEq%2Fw3M%2FyekrRFXSn1YPusRIdCqL%2BX2j%2FHcIjOzY0GysGxV4MQHKFbrVa9FGblEnyAD3qmPX4GnK2bdKuah9R%2BThjIusoGYuqtxjsvSJ9hd%2FXywDHopiKcXha7i4%3D"&sign_type="RSA"
     * weiPay : {}
     * cmbpay : {}
     * totalPrice : 0.01
     * freePrice : 0
     * orderNo : C768292504201203712
     */

    private PayBean data;

    public static RechargeMoney objectFromData(String str) {

        return new Gson().fromJson(str, RechargeMoney.class);
    }

    public static List<RechargeMoney> arrayRechargeMoneyFromData(String str) {

        Type listType = new TypeToken<ArrayList<RechargeMoney>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public PayBean getData() {
        return data;
    }

    public void setData(PayBean data) {
        this.data = data;
    }


}
